Ensure if-dependency edges don't pull in unselected tasks during target phase#917
Open
ahal wants to merge 1 commit intotaskcluster:mainfrom
Open
Ensure if-dependency edges don't pull in unselected tasks during target phase#917ahal wants to merge 1 commit intotaskcluster:mainfrom
ahal wants to merge 1 commit intotaskcluster:mainfrom
Conversation
4ff66be to
a28e1c2
Compare
Contributor
|
Does this fix #710 ? |
Collaborator
Author
|
Yes! Forgot about that.. I'll add it to the commit message |
BREAKING CHANGE: Tasks will no longer pull `if-dependencies` in at the target phase. It's now possible for a task with multiple `if-dependencies` to run after one task, without also causing the other to run. Bug: 2020718 Issue: taskcluster#710
a28e1c2 to
5f87817
Compare
Collaborator
Author
|
Hm, though it would only impact the I think I'd want to do it in a follow-up as there is some time pressure to fixing this for |
Eijebong
reviewed
Mar 11, 2026
Contributor
There was a problem hiding this comment.
I think this is slightly wrong? If a task is both an if-dep for one task and a hard dep for another, the if-dep edge gets dropped.
def test_if_deps_bork(maketgg):
tgg = maketgg(
target_tasks=["u-t-0", "v-t-0"],
kinds=[
("base", {}),
(
"v",
{
"task-defaults": {
"dependencies": {"base": "base-t-0"},
}
},
),
(
"u",
{
"task-defaults": {
"dependencies": {"if-dep": "base-t-0"},
"if-dependencies": ["base-t-0"],
}
},
),
],
)
target_graph = tgg.target_task_graph
assert "u-t-0" in target_graph.tasks
assert "v-t-0" in target_graph.tasks
assert "base-t-0" in target_graph.tasks
edges = target_graph.graph.edges
assert ("u-t-0", "base-t-0", "if-dep") in edges
Contributor
|
I worry a bit about unintended consequences here, for tasks that might expect that if they're running then all their dependencies have also run, not just one of them. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.